from django import forms
from django.core.exceptions import ValidationError

class TeacherForm(forms.Form):
    name = forms.CharField(min_length=4,label='name',error_messages={'min_length':'too short 4'})
    iphone = forms.CharField(max_length=11,min_length=11,label="phone",error_messages={'min_length':'too short 11','max_length':'too long 11'})
    email = forms.CharField(max_length=23,required=True,error_messages={'required':'must submit'})
    introduce = forms.CharField(min_length=10,required=True,error_messages={'min_length':'too short 19'})


class OrganizationForm(forms.Form):
    name = forms.CharField(min_length=4,label='name',error_messages={'min_length':'too short 4'})
    iphone = forms.CharField(max_length=11,min_length=11,label="phone",error_messages={'min_length':'too short 11','max_length':'too long 11'})
    email = forms.CharField(max_length=23,required=True,error_messages={'required':'must submit'})
    introduce = forms.CharField(min_length=10,required=True,error_messages={'min_length':'too short 19'})

class UserFileForm(forms.Form):
    name = forms.CharField(max_length=100)
    price = forms.FloatField()
    share = forms.BooleanField()